<#compress>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta charset="utf-8"/>
    <title>登录</title>
    <meta name="description" content="用户登录页"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>

    <#include "*/basic/css.ftl"/>

</head>

<body class="login-layout light-login">
<div class="main-container">
    <div class="main-content">
        <div class="row">
            <div class="col-sm-10 col-sm-offset-1">
                <div class="login-container">
                    <div class="center">
                        <h1>
                            <i class="ace-icon fa fa-leaf green"></i>
                            <span class="red">XXX</span>
                            <span class="grey" id="id-text2">管理后台</span>
                        </h1>
                    </div>

                    <div class="space-6"></div>

                    <div class="position-relative">
                        <div id="login-box" class="login-box visible widget-box no-border">
                            <div class="widget-body">
                                <div class="widget-main">
                                    <h4 class="header blue lighter bigger">
                                        <i class="ace-icon fa fa-coffee green"></i>
                                        请输入你的信息
                                    </h4>

                                    <div class="space-6"></div>

                                    <#if shiroLoginFailure??>
                                        <div class="has-error">
                                            <#if shiroLoginFailure == "org.apache.shiro.authc.IncorrectCredentialsException">
                                                <label for="inputError" class="control-label">
                                                    用户名或密码不正确
                                                </label>
                                            <#elseif shiroLoginFailure == "net.coding.chenxiaobo.shiro.exception.CaptchaNotMatchException">
                                                <label for="inputError" class="control-label">
                                                    验证码不正确
                                                </label>
                                            <#elseif shiroLoginFailure == "net.coding.chenxiaobo.shiro.exception.CaptchaTimeoutException">
                                                <label for="inputError" class="control-label">
                                                    验证码失效
                                                </label>
                                            <#elseif shiroLoginFailure == "org.apache.shiro.authc.DisabledAccountException">
                                                <label for="inputError" class="control-label">
                                                    你的帐号已经被禁用
                                                </label>
                                            <#else>
                                                <label for="inputError" class="control-label">
                                                    服务器发生异常，请稍后尝试。
                                                </label>
                                            </#if>
                                        </div>
                                    </#if>

                                    <form class="form-horizontal" action="${base}/login"
                                          method="post">
                                        <div class="form-group">
                                            <div class="col-md-12">
                                                <span class="block input-icon input-icon-right">
                                                    <input type="text" name="username"
                                                           class="form-control" placeholder="用户名"
                                                           value="${RequestParameters.username!''}">
                                                    <i class="ace-icon fa fa-user"></i>
                                                </span>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <div class="col-md-12">
                                                <span class="block input-icon input-icon-right">
                                                    <input type="password" name="password"
                                                           class="form-control"
                                                           placeholder="密码"/>
                                                    <i class="ace-icon fa fa-lock"></i>
                                                </span>
                                            </div>
                                        </div>
                                        <#if Session['LOGIN_FAILURE_COUNT']?? && Session['LOGIN_FAILURE_COUNT'] gt 0>
                                            <div class="form-group">
                                                <div class="col-md-12">
                                                    <input type="text" name="captcha"
                                                           class="col-md-8"
                                                           placeholder="验证码"/>
                                                    <img id="captchaImg" class="col-md-offset-1"
                                                         src="${base}/get-captcha"/>
                                                </div>
                                            </div>
                                        </#if>

                                        <div class="space"></div>

                                        <div class="clearfix">
                                            <label class="inline">
                                                <input type="checkbox" class="ace"
                                                       name="rememberMe" value="true"/>
                                                <span class="lbl">记住我</span>
                                            </label>

                                            <button type="submit"
                                                    class="width-35 pull-right btn btn-sm btn-primary">
                                                <i class="ace-icon fa fa-key"></i>
                                                <span class="bigger-110">登录</span>
                                            </button>
                                        </div>

                                        <div class="space-4"></div>
                                    </form>

                                </div>
                                <!-- /.widget-main -->
                            </div>
                            <!-- /.widget-body -->
                        </div>
                        <!-- /.login-box -->
                    </div>
                    <!-- /.position-relative -->

                </div>
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->

    </div>
    <!-- /.main-content -->
</div>
<!-- /.main-container -->

    <#include "*/basic/js.ftl"/>

</body>
</html>
</#compress>
